/*
 * Copyright (C), sensetime 2023
 * Author: dingjinfeng
 * Date: 2023/1/3 15:31
 * Description:
 */
package com.senseauto.autorecordlib.strategy;

public class RecordStrategy {
    private boolean isContinuousRecord = true;
    private long recordMaxTime = 2* 60 * 1000;
    private String videoDir;
    private int videoWidth = 1920;
    private int videoHeight = 1080;
    private int bitRate = 1000000;
    private int frameRate = 30;

    public int getFrameRate() {
        return frameRate;
    }

    /**
     * 设置帧率 默认30
     * @param frameRate
     * @return
     */
    public RecordStrategy setFrameRate(int frameRate) {
        this.frameRate = frameRate;
        return this;
    }

    public boolean isContinuousRecord() {
        return isContinuousRecord;
    }

    /**
     * 设置是否连续录制，false单次录制，true连续录制，默认true
     * @param continuousRecord
     * @return
     */
    public RecordStrategy setContinuousRecord(boolean continuousRecord) {
        isContinuousRecord = continuousRecord;
        return this;
    }

    public long getRecordMaxTime() {
        return recordMaxTime;
    }

    /**
     * 设置录制的视频的最大长度，单位毫秒，默认2分钟
     * @param recordMaxTime
     * @return
     */
    public RecordStrategy setRecordMaxTime(long recordMaxTime) {
        this.recordMaxTime = recordMaxTime;
        return this;
    }

    public String getVideoDir() {
        return videoDir;
    }

    /**
     * 设置录制的视频路径
     * @param videoDir
     * @return
     */
    public RecordStrategy setVideoDir(String videoDir) {
        this.videoDir = videoDir;
        return this;
    }

    public int getVideoWidth() {
        return videoWidth;
    }

    /**
     * 设置视频画面宽度，默认1920
     * @param videoWidth
     * @return
     */
    public RecordStrategy setVideoWidth(int videoWidth) {
        this.videoWidth = videoWidth;
        return this;
    }

    public int getVideoHeight() {
        return videoHeight;
    }

    /**
     * 设置视频画面高度，默认1080
     * @param videoHeight
     * @return
     */
    public RecordStrategy setVideoHeight(int videoHeight) {
        this.videoHeight = videoHeight;
        return this;
    }

    public int getBitRate() {
        return bitRate;
    }

    /**
     * 设置比特率，默认1000000
     * @param bitRate
     * @return
     */
    public RecordStrategy setBitRate(int bitRate) {
        this.bitRate = bitRate;
        return this;
    }
}
